package cn.tedu.oop;

public class Test2_Inter {
    public static void main(String[] args) {
        System.out.println(Inter.age);
        System.out.println(new InterImpl().age);
        Inter in = new InterImpl();
        in.show();
        in.save();
        Inter.test();
    }
}
interface Inter{
    int age = 20;
    default public void show(){
        System.out.println("这是jdk1.8的新特性");
    }
    static public void test(){
        System.out.println("这是jdk1.8的新特性");
    }
    void save();
}
class InterImpl extends Object implements Inter{
    public InterImpl(){
        super();
    }

    @Override
    public void save() {
        System.out.println("数据保存成功！");
    }
}